<?php echo '<link href="'.base_url().'css/share/index.css" rel="stylesheet" type="text/css" />';		?>
	<script type = "text/javascript">
	  $(document).ready(function(  ){
	      $( ".oddline" ).mouseover( function(  ){
		  $( this ).css( "background-color","#EBF5FC" );
		});
	      $( ".oddline" ).mouseleave( function(  ){
		  $( this ).css( "background-color","#FFF" );
		});
	      $( ".evenline" ).mouseover( function(  ){
		  $( this ).css( "background-color","#EBF5FC" );
		});
	      $( ".evenline" ).mouseleave( function(  ){
		  $( this ).css( "background-color","#FFF" );
		});
	      $( ".list-item" ).mouseover( function(  ){
		  $( this ).css( "background-color","#EBF5FC" );
		});
	      $( ".list-item" ).mouseleave( function(  ){
		  $( this ).css( "background-color","#FFF" );
		});
	    });
</script>					

<div class="main" >

	
	<div class="leftbox1 left">
	
		<div class="list-box"> 
			    <div class="boxtop" style="border-bottom:0px;"> 
			      资料分类
			    </div> 
			    
			    <div class="list-item" style="background-color: rgb(255, 255, 255); "><a class = "cat-link" href="<?php echo site_url();?>/share/category/show/paper">试卷</a></div>
			    <div class="list-item" style="background-color: rgb(255, 255, 255); "><a class = "cat-link" href="<?php echo site_url();?>/share/category/show/answer">作业答案</a></div> 
				  
			    <div class="list-item" style="background-color: rgb(255, 255, 255); "><a class = "cat-link" href="<?php echo site_url();?>/share/category/show/textbook">教材</a></div> 
				  
			    <div class="list-item"><a class = "cat-link" href="<?php echo site_url();?>/share/category/show/note">笔记</a></div> 
				  
			    <div class="list-item"><a class = "cat-link" href="<?php echo site_url();?>/share/category/show/other">其他</a></div> 
				  
		</div>
	
	</div>
	<div class="leftbox2 left">
	<div class="boxborder">
            <div class="boxtop blue">最新分享</div>
            <div class="boxdown blue">
            	<table>
                <?
				foreach($newest as $row){
					switch($row->category){
						case 'paper':$chi='试卷';break;
						case 'textbook':$chi='教科书';break;
						case 'answer':$chi='答案';break;
						default:$chi='';
					}
				?>
                <tr>
                <td>
                
					 <li>
                    	<a href='<? echo base_url()."index.php/share/category/show/$row->category";?>'>[<? echo $chi;?>]</a>
                    	<a href='<? echo base_url()."index.php/search/share/tag/".$row->subject;?>
'>[<? echo $row->subject;?>]</a>
                        <a href='<? echo base_url()."index.php/search/share/tag/".$row->year;?>'>[<? echo $row->year;?>]</a>
                        <a href='<? echo base_url()."index.php/share/document/preview/$row->fid";?>'><? echo $row->title;?></a>
                     </li>
                     <br>
                </td>
                <td align="right" width="80px">
				
				<li><? 
				if($row->rank_times == 0)
				echo "评分：".$row->rank;
				else 
				echo "评分：".$row->rank/$row->rank_times;?></li><br>
                			
                </td>
                
                </tr>
                <? } ?>	
                </table>
            </div>
        </div>
	<div class="boxborder">
            <div class="boxtop blue">推荐分享</div>
            <div class="boxdown blue">
            	<table>
                <?
				foreach($rank as $row){
					switch($row->category){
						case 'paper':$chi='试卷';break;
						case 'textbook':$chi='教科书';break;
						case 'answer':$chi='答案';break;
						default:$chi='';
					}
				?>
                <tr>
                <td>
                
					 <li>
                    	<a href='<? echo base_url()."index.php/share/category/show/$row->category";?>'>[<? echo $chi;?>]</a>
                    	<a href='<? echo base_url()."index.php/search/share/tag/".$row->subject;?>
'>[<? echo $row->subject;?>]</a>
                        <a href='<? echo base_url()."index.php/search/share/tag/".$row->year;?>'>[<? echo $row->year;?>]</a>
                        <a href='<? echo base_url()."index.php/share/document/preview/$row->fid";?>'><? echo $row->title;?></a>
                     </li>
                     <br>
                </td>
                <td align="right" width="80px">
				
				<li><?
				if($row->rank_times == 0)
				echo "评分：".$row->rank;
				else 
				echo "评分：".$row->rank/$row->rank_times;?></li><br>
                			
                </td>
                
                </tr>
                <? } ?>	
                </table>
            </div>
        </div>
	</div>
	<!-- 
	<div class="leftbox2">
		<div class="boxborder">
		  <div class = "boxtop">热门资料</div>
		  <div class = "box2body">这里是热门资料</div>
		</div>
		<div class="boxborder ">
		  <div class = "boxtop">为您推荐</div>
		  <div class = "box2body">这里是为您推荐</div>
		</div>
	</div>
	 -->
	<div class="leftbox3">
		<div class="boxborder upper">
		<div class = "boxtop">和大家分享你的资料</div>
			<div class="boxdown">
				<div class = "button_red"><a id="wanna_share" class ="link_red" href = "<?php echo site_url()?>/share/upload/form/">我要分享</a></div>
			</div>
		</div>
		
	</div>
	

	<div class="clear"></div>


</div><!-- div.main 结束-->
<script type = "text/javascript">
$(document).ready(function(){
    $( ".linkblock" ).mouseover(function(  ){
	$( this ).css( "background-color","#abc7d9" );
      });
    $( ".linkblock" ).mouseleave(function(  ){
	$( this ).css( "background-color","#fff" );
      });
  });
</script>

